/**
 * 
 */
package gov.nist.healthcare.testframework.communication;

import gov.nist.healthcare.core.message.v3.HL7V3Message;
import java.io.IOException;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.soap.SOAPException;
import org.w3c.dom.DOMException;
import org.xml.sax.SAXException;

/**
 * Holds an instance of either an HTTP request or an HTTP response that contains
 * a HL7V3Message as its entity
 * 
 * @author Michael Ogata
 */
public interface HTTPSoapV3Container {

    /**
     * This method updates all internal structures of the container and
     * generates the string representation of this HTTP message
     * 
     * @return A string containing the entire content of this message. This
     *         includes the HTTP headers and SOAP Envelope contents
     * @throws SOAPException
     *         this container was unable to process the contents of its
     *         SOAPMessage
     * @throws IOException
     * @throws SAXException
     * @throws ParserConfigurationException
     */
    public String getStringRepresentation() throws SOAPException, IOException,
            SAXException, ParserConfigurationException;

    /**
     * Returns the current content of this containers HL7V3Message
     * 
     * @return the current content of this containers HL7V3Message
     */
    public HL7V3Message getV3payload();

    /**
     * Inspects the SOAP Headers of the currently known HL7V3Message for
     * correctness in relation to ITI TF-2x Appendix V
     * 
     * @return
     * @throws DOMException
     * @throws SOAPException
     * @throws WSAException
     */
    public boolean isWSAValid() throws DOMException, SOAPException,
            WSAException;

}
